cmake_minimum_required(VERSION 3.17)

project(Hello)

INCLUDE_DIRECTORIES(
        headers
)

add_definitions(-D ASN_EMIT_DEBUG=1)

AUX_SOURCE_DIRECTORY(src DIR_SRCS)

SET(TEST_MATH ${DIR_SRCS} rsi_test.cpp rsi_test.h common_free.cpp common_free.h bsm_test.cpp bsm_test.h rsm_test.cpp rsm_test.h spat_test.cpp spat_test.h map_test.cpp map_test.h common_util.cpp common_util.h)

ADD_EXECUTABLE(${PROJECT_NAME} main.cpp ${TEST_MATH})


#set(CMAKE_CXX_STANDARD 14)
#
#add_executable(Hello main.cpp converter-example.c Acceleration.h BrakeSystemStatus.h    FullPositionVector.h             LightState.h           OffsetLL-B22.h           Position-LL-28B.h               TimeChangeDetails.h
#        AccelerationSet4Way.h   CoarseHeading.h        GNSSstatus.h                     Link.h                 OffsetLL-B24.h           Position-LL-32B.h               TimeConfidence.h
#        AlertType.h             Confidence.h           HeadingConfidence.h              LinkList.h             OPEN_TYPE.h              Position-LL-36B.h               TimeMark.h
#        AllowedManeuvers.h      ConnectingLane.h       Heading.h                        Longitude.h            ParticipantData.h        Position-LL-44B.h               TimeOffset.h
#        AntiLockBrakeStatus.h   Connection.h           IA5String.h                      MapData.h              ParticipantList.h        Position-LL-48B.h               TractionControlStatus.h
#        asn_application.h       ConnectsToList.h       INTEGER.h                        MessageFrame.h         ParticipantType.h        Position-LLmD-64b.h             TransmissionState.h
#        asn_bit_data.h          constraints.h          IntersectionState.h              MinuteOfTheYear.h      PathHistory.h            PositionOffsetLL.h              VehicleClassification.h
#        asn_codecs.h            constr_CHOICE.h        IntersectionStateList.h          MotionConfidenceSet.h  PathHistoryPoint.h       PositionOffsetLLV.h             VehicleEventFlags.h
#        asn_codecs_prim.h       constr_SEQUENCE.h      IntersectionStatusObject.h       Movement.h             PathHistoryPointList.h   Priority.h                      VehicleHeight.h
#        asn_internal.h          constr_SEQUENCE_OF.h   LaneAttributes-Barrier.h         MovementList.h         PathPointList.h          Radius.h                        VehicleLength.h
#        asn_ioc.h               constr_SET_OF.h        LaneAttributes-Bike.h            MsgCount.h             PathPrediction.h         RadiusOfCurvature.h             VehicleSafetyExtensions.h
#        asn_random_fill.h       constr_TYPE.h          LaneAttributes-Crosswalk.h       NativeEnumerated.h     per_decoder.h            RegulatorySpeedLimit.h          VehicleSize.h
#        asn_SEQUENCE_OF.h       DDateTime.h            LaneAttributes.h                 NativeInteger.h        per_encoder.h            RoadPoint.h                     VehicleWidth.h
#        asn_SET_OF.h            DDay.h                 LaneAttributes-Parking.h         Node.h                 per_opentype.h           RoadRegulatorID.h               VerticalAcceleration.h
#        asn_system.h            der_encoder.h          LaneAttributes-Sidewalk.h        NodeID.h               per_support.h            RoadSideInformation.h           VerticalOffset.h
#        AuxiliaryBrakeStatus.h  DescriptiveName.h      LaneAttributes-Striping.h        NodeList.h             Phase.h                  RoadsideSafetyMessage.h         VertOffset-B07.h
#        BasicSafetyMessage.h    DHour.h                LaneAttributes-TrackedVehicle.h  NodeReferenceID.h      PhaseID.h                SourceType.h                    VertOffset-B08.h
#        BasicVehicleClass.h     DMinute.h              LaneAttributes-Vehicle.h         OCTET_STRING.h         PhaseList.h              SPAT.h                          VertOffset-B09.h
#        ber_decoder.h           DMonth.h               Lane.h                           oer_decoder.h          PhaseState.h             SpeedConfidence.h               VertOffset-B10.h
#        ber_tlv_length.h        DSecond.h              LaneID.h                         oer_encoder.h          PhaseStateList.h         Speed.h                         VertOffset-B11.h
#        ber_tlv_tag.h           DTimeOffset.h          LaneList.h                       oer_support.h          PointList.h              SpeedLimitList.h                VertOffset-B12.h
#        BIT_STRING.h            DYear.h                LaneSharing.h                    OffsetLL-B12.h         Position3D.h             SpeedLimitType.h                xer_decoder.h
#        BrakeAppliedStatus.h    ElevationConfidence.h  LaneTypeAttributes.h             OffsetLL-B14.h         PositionConfidence.h     StabilityControlStatus.h        xer_encoder.h
#        BrakeBoostApplied.h     Elevation.h            LaneWidth.h                      OffsetLL-B16.h         PositionConfidenceSet.h  SteeringWheelAngleConfidence.h  xer_support.h
#        BrakePedalStatus.h      ExteriorLights.h       Latitude.h                       OffsetLL-B18.h         Position-LL-24B.h        SteeringWheelAngle.h            YawRate.h)


#cmake_minimum_required(VERSION 3.17.5)
#project(Hello)
#
#if (CMAKE_BUILD_TYPE)
#else ()
#    set(CMAKE_BUILD_TYPE "Debug")
#endif ()
#
#set(CMAKE_CXX_FLAGS_DEBUG " $ENV{CXXFLAGS} -std=c++11 -DDEBUG -g -O0 -w")
#set(CMAKE_CXX_FLAGS_RELEASE " $ENV{CXXFLAGS} -std=c++11 -DNDEBUG -O3 -w")
#
#include_directories(${PROJECT_SOURCE_DIR})
#
##link_directories(${PROJECT_SOURCE_DIR}/../libs)
#
##file(GLOB_RECURSE SRC_FILES
##        ${PROJECT_SOURCE_DIR}/myParcel.cpp
##        ${PROJECT_SOURCE_DIR}/parcel.cpp
##        ${PROJECT_SOURCE_DIR}/com_platform_kuangshi_sdk_sdks.cpp)
##file(GLOB_RECURSE SRC_FILES
##        ${PROJECT_SOURCE_DIR}/*.c)
#add_executable(Hello main.cpp Acceleration.h          BrakeSystemStatus.h    FullPositionVector.h             LightState.h           OffsetLL-B22.h           Position-LL-28B.h               TimeChangeDetails.h
#        AccelerationSet4Way.h   CoarseHeading.h        GNSSstatus.h                     Link.h                 OffsetLL-B24.h           Position-LL-32B.h               TimeConfidence.h
#        AlertType.h             Confidence.h           HeadingConfidence.h              LinkList.h             OPEN_TYPE.h              Position-LL-36B.h               TimeMark.h
#        AllowedManeuvers.h      ConnectingLane.h       Heading.h                        Longitude.h            ParticipantData.h        Position-LL-44B.h               TimeOffset.h
#        AntiLockBrakeStatus.h   Connection.h           IA5String.h                      MapData.h              ParticipantList.h        Position-LL-48B.h               TractionControlStatus.h
#        asn_application.h       ConnectsToList.h       INTEGER.h                        MessageFrame.h         ParticipantType.h        Position-LLmD-64b.h             TransmissionState.h
#        asn_bit_data.h          constraints.h          IntersectionState.h              MinuteOfTheYear.h      PathHistory.h            PositionOffsetLL.h              VehicleClassification.h
#        asn_codecs.h            constr_CHOICE.h        IntersectionStateList.h          MotionConfidenceSet.h  PathHistoryPoint.h       PositionOffsetLLV.h             VehicleEventFlags.h
#        asn_codecs_prim.h       constr_SEQUENCE.h      IntersectionStatusObject.h       Movement.h             PathHistoryPointList.h   Priority.h                      VehicleHeight.h
#        asn_internal.h          constr_SEQUENCE_OF.h   LaneAttributes-Barrier.h         MovementList.h         PathPointList.h          Radius.h                        VehicleLength.h
#        asn_ioc.h               constr_SET_OF.h        LaneAttributes-Bike.h            MsgCount.h             PathPrediction.h         RadiusOfCurvature.h             VehicleSafetyExtensions.h
#        asn_random_fill.h       constr_TYPE.h          LaneAttributes-Crosswalk.h       NativeEnumerated.h     per_decoder.h            RegulatorySpeedLimit.h          VehicleSize.h
#        asn_SEQUENCE_OF.h       DDateTime.h            LaneAttributes.h                 NativeInteger.h        per_encoder.h            RoadPoint.h                     VehicleWidth.h
#        asn_SET_OF.h            DDay.h                 LaneAttributes-Parking.h         Node.h                 per_opentype.h           RoadRegulatorID.h               VerticalAcceleration.h
#        asn_system.h            der_encoder.h          LaneAttributes-Sidewalk.h        NodeID.h               per_support.h            RoadSideInformation.h           VerticalOffset.h
#        AuxiliaryBrakeStatus.h  DescriptiveName.h      LaneAttributes-Striping.h        NodeList.h             Phase.h                  RoadsideSafetyMessage.h         VertOffset-B07.h
#        BasicSafetyMessage.h    DHour.h                LaneAttributes-TrackedVehicle.h  NodeReferenceID.h      PhaseID.h                SourceType.h                    VertOffset-B08.h
#        BasicVehicleClass.h     DMinute.h              LaneAttributes-Vehicle.h         OCTET_STRING.h         PhaseList.h              SPAT.h                          VertOffset-B09.h
#        ber_decoder.h           DMonth.h               Lane.h                           oer_decoder.h          PhaseState.h             SpeedConfidence.h               VertOffset-B10.h
#        ber_tlv_length.h        DSecond.h              LaneID.h                         oer_encoder.h          PhaseStateList.h         Speed.h                         VertOffset-B11.h
#        ber_tlv_tag.h           DTimeOffset.h          LaneList.h                       oer_support.h          PointList.h              SpeedLimitList.h                VertOffset-B12.h
#        BIT_STRING.h            DYear.h                LaneSharing.h                    OffsetLL-B12.h         Position3D.h             SpeedLimitType.h                xer_decoder.h
#        BrakeAppliedStatus.h    ElevationConfidence.h  LaneTypeAttributes.h             OffsetLL-B14.h         PositionConfidence.h     StabilityControlStatus.h        xer_encoder.h
#        BrakeBoostApplied.h     Elevation.h            LaneWidth.h                      OffsetLL-B16.h         PositionConfidenceSet.h  SteeringWheelAngleConfidence.h  xer_support.h
#        BrakePedalStatus.h      ExteriorLights.h       Latitude.h                       OffsetLL-B18.h         Position-LL-24B.h        SteeringWheelAngle.h            YawRate.h)
#set(CMAKE_INSTALL_RPATH  ./)

#add_library(${PROJECT_NAME} SHARED ${SRC_FILES})
#target_link_libraries(${PROJECT_NAME} ArmStrongSDK pthread)

#install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${PROJECT_SOURCE_DIR}/../libs)
#install(FILES ${PROJECT_SOURCE_DIR}/linux/gcc540/libArmStrongSDK.so DESTINATION ${PROJECT_SOURCE_DIR}/java)


#add_custom_target(java COMMAND sh ${PROJECT_SOURCE_DIR}/java.sh ${PROJECT_SOURCE_DIR}/../ ${PROJECT_SOURCE_DIR}/../bin)
#add_custom_target(cleanjava COMMAND rm -rf ${PROJECT_SOURCE_DIR}/../bin/*)